<?php 

set_time_limit(0);

header("Content-type:application/json;Charset=utf8");

header('Access-Control-Allow-Origin:*');

header('Access-Control-Allow-Methods:GET');

header('Access-Control-Allow-Headers:x-requested-with');

define('PATH', strtr(__DIR__, '\\', '/'));

require(PATH.'/init.php');

$rand_arr = array(
    6786342451
);

$list = isset($_GET['list'])?$_GET['list']:false;

$lyc = empty($lyc)? false :true;

if($list){
    $rand_arr = explode(',',$list);
}

$key=array_rand($rand_arr,1);

$playlist_id = $rand_arr[$key];

// 保存目录,不设置为不保存
$dir = PATH .'/data';

$musicLIST = save($playlist_id,$dir,true);

echo $musicLIST;
